package com.stylefeng.guns.common.persistence.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import com.stylefeng.guns.core.util.excel.annotation.ExcelField;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author zhouh
 * @since 2017-10-17
 */
@TableName("biz_order_info")
public class OrderInfo extends Model<OrderInfo> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
	@TableId(value="id", type= IdType.AUTO)
	private Long id;

    /**
     * 订单编号
     */
	@TableField("order_no")
	private String orderNo;
    /**
     * 部门id
     */
	private Integer deptid;
    /**
     * 用户姓名
     */
	@TableField("user_name")
	private String userName;
    /**
     * 用户手机号
     */
	@TableField("user_phone")
	private String userPhone;
    /**
     * 客户地址
     */
	private String address;

	/**
	 * 订单信息
	 */
	@TableField("order_infos")
	private String orderInfos;
    /**
     * 订单金额
     */
	private Double amount;
    /**
     * 预付金额
     */
	@TableField("deposit_amount")
	private Double depositAmount;
    /**
     * 尾款金额
     */
	@TableField("remain_balance")
	private Double remainBalance;
    /**
     * 业务员姓名
     */
	@TableField("sales_name")
	private String salesName;

	/**
	 * 销售日期
	 */
	@TableField("sales_time")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date salesTime;

    /**
     * 安装师傅姓名
     */
	@TableField("setup_name")
	private String setupName;
    /**
     * 机器安装日期
     */
	@TableField("setup_time")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date setupTime;
    /**
     *  备注
     */
	private String remarks;

    /**
     * 创建日期
     */
	@TableField("create_time")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date createTime;
    /**
     * 订单状态[-1-无效订单,0-意向订单,1-下单预付款,2-预埋管道,3-安装完成]
     */
	private Integer status;

	/**
	 * 是否需要预埋[1-需要，2-不需要]
	 */
	@TableField("is_yumai")
	private Integer isYumai;

	/**
	 * 预埋日期
	 */
	@TableField("yumai_time")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date yumaiTime;


	/**
	 * 下次工单通知日期
	 */
	@TableField("next_nitice_time")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date nextNiticeTime;

	/**
	 * 滤芯更换周期
	 */
	@TableField("replace_period")
	private Integer replacePeriod;

	public Integer getReplacePeriod() {
		return replacePeriod;
	}

	public void setReplacePeriod(Integer replacePeriod) {
		this.replacePeriod = replacePeriod;
	}

	public Date getNextNiticeTime() {
		return nextNiticeTime;
	}

	public void setNextNiticeTime(Date nextNiticeTime) {
		this.nextNiticeTime = nextNiticeTime;
	}

	public Integer getIsYumai() {
		return isYumai;
	}

	public void setIsYumai(Integer isYumai) {
		this.isYumai = isYumai;
	}

	public Date getYumaiTime() {
		return yumaiTime;
	}

	public void setYumaiTime(Date yumaiTime) {
		this.yumaiTime = yumaiTime;
	}


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

	public Integer getDeptid() {
		return deptid;
	}

	public void setDeptid(Integer deptid) {
		this.deptid = deptid;
	}


	@ExcelField(title="客户姓名", align=2, sort=0)
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@ExcelField(title="客户电话", align=2, sort=1)
	public String getUserPhone() {
		return userPhone;
	}

	public void setUserPhone(String userPhone) {
		this.userPhone = userPhone;
	}

	@ExcelField(title="客户地址", align=2, sort=2)
	public String getAddress() {
		return address;
	}


	public void setAddress(String address) {
		this.address = address;
	}

	public Double getAmount() {
		return amount;
	}
	public void setAmount(Double amount) {
		this.amount = amount;
	}

	public Double getDepositAmount() {
		return depositAmount;
	}

	public void setDepositAmount(Double depositAmount) {
		this.depositAmount = depositAmount;
	}

	public Double getRemainBalance() {
		return remainBalance;
	}

	public void setRemainBalance(Double remainBalance) {
		this.remainBalance = remainBalance;
	}

	public String getSalesName() {
		return salesName;
	}

	public void setSalesName(String salesName) {
		this.salesName = salesName;
	}

	public String getSetupName() {
		return setupName;
	}

	public void setSetupName(String setupName) {
		this.setupName = setupName;
	}

	public Date getSetupTime() {
		return setupTime;
	}

	public void setSetupTime(Date setupTime) {
		this.setupTime = setupTime;
	}

	@ExcelField(title="备注", align=4, sort=3)
	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getSalesTime() {
		return salesTime;
	}

	public void setSalesTime(Date salesTime) {
		this.salesTime = salesTime;
	}

	public String getOrderInfos() {
		return orderInfos;
	}

	public void setOrderInfos(String orderInfos) {
		this.orderInfos = orderInfos;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "OrderInfo{" +
			"id=" + id +
			", orderNo=" + orderNo +
			", deptid=" + deptid +
			", userName=" + userName +
			", userPhone=" + userPhone +
			", address=" + address +
			", amount=" + amount +
			", depositAmount=" + depositAmount +
			", remainBalance=" + remainBalance +
			", salesName=" + salesName +
			", setupName=" + setupName +
			", setupTime=" + setupTime +
			", remarks=" + remarks +
			", createTime=" + createTime +
			", status=" + status +
			"}";
	}
}
